package com.ruoyi.cs.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.cs.domain.TWarUser;
import com.ruoyi.cs.domain.vo.TWarUserParamVo;
import com.ruoyi.cs.mapper.TWarUserMapper;
import com.ruoyi.cs.service.ITWarUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 战令用户Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-11
 */
@Service
@SuppressWarnings("all")
public class TWarUserServiceImpl implements ITWarUserService
{
    @Autowired
    private TWarUserMapper tWarUserMapper;

    /**
     * 查询战令用户
     * 
     * @param id 战令用户主键
     * @return 战令用户
     */
    @Override
    public TWarUser selectTWarUserById(Long id)
    {
        return tWarUserMapper.selectTWarUserById(id);
    }

    /**
     * 查询战令用户列表
     * 
     * @param tWarUser 战令用户
     * @return 战令用户
     */
    @Override
    public List<TWarUser> selectTWarUserList(TWarUser tWarUser)
    {
        return tWarUserMapper.selectTWarUserList(tWarUser);
    }

    /**
     * 新增战令用户
     * 
     * @param tWarUser 战令用户
     * @return 结果
     */
    @Override
    public int insertTWarUser(TWarUser tWarUser)
    {
        tWarUser.setCreateTime(DateUtils.getNowDate());
        return tWarUserMapper.insertTWarUser(tWarUser);
    }

    /**
     * 修改战令用户
     * 
     * @param tWarUser 战令用户
     * @return 结果
     */
    @Override
    public int updateTWarUser(TWarUser tWarUser)
    {
        tWarUser.setUpdateTime(DateUtils.getNowDate());
        return tWarUserMapper.updateTWarUser(tWarUser);
    }

    /**
     * 批量删除战令用户
     * 
     * @param ids 需要删除的战令用户主键
     * @return 结果
     */
    @Override
    public int deleteTWarUserByIds(Long[] ids)
    {
        return tWarUserMapper.deleteTWarUserByIds(ids);
    }

    /**
     * 删除战令用户信息
     * 
     * @param id 战令用户主键
     * @return 结果
     */
    @Override
    public int deleteTWarUserById(Long id)
    {
        return tWarUserMapper.deleteTWarUserById(id);
    }

    @Override
    public List<TWarUser> warUserListByWarId(Long warId, TWarUserParamVo tWarUserParamVo) {
        return null;
    }
}
